// miniprogram/pages/lookMe/lookMe.js
import api from '../../api/index'
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info:{},
    openid:"",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options.openid)
    var openid = options.openid
    var params = {openid}
    this.setData({
      openid,
    })
    api.userInfo.getInfo(params).then(res=>{
      console.log(res.result.data.data[0])
      this.setData({
        info:res.result.data.data[0]
      })
    })
  },
  contact: function() {  //跳转到联系界面，但是未传过去双方id
    var id1 =  this.data.openid
    var id2 = app.globalData.openid
    wx.navigateTo({
      url: '../../pages/message/chartRoom/chartRoom?id1='+id1+'&id2='+id2,
    })
  },
})